package com.wz.project.bas.workShop.service;

import com.wz.common.utils.text.Convert;
import com.wz.project.bas.workShop.domain.BasWorkShop;
import com.wz.project.bas.workShop.mapper.WorkShopMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkShopServiceImpl implements WorkShopService{

    @Autowired
    WorkShopMapper workShopMapper;

    @Override
    public List<BasWorkShop> selectWorkShopList(BasWorkShop basWorkShop) {
        return workShopMapper.selectWorkShopList(basWorkShop);
    }

    @Override
    public int deleteWorkShopByIds(String ids) {
        String[] userIds = Convert.toStrArray(ids);
        return workShopMapper.deleteWorkShopByIds(userIds);
    }

    @Override
    public BasWorkShop selectWorkShopByWorkShopId(String workshop_id) {
        return workShopMapper.selectWorkShopByWorkShopId(workshop_id);
    }

    @Override
    public int saveAndUpdate(BasWorkShop basWorkShop) {
        return workShopMapper.saveAndUpdate(basWorkShop);
    }

    @Override
    public int insertWorkShop(BasWorkShop basWorkShop) {
        return workShopMapper.insertWorkShop(basWorkShop);
    }
}
